package com.asset.dispoal.channel.service;


import com.asset.dispoal.channel.api.SysChannelService;
import com.asset.dispoal.channel.dto.SysChannelDebtRequest;
import com.asset.dispoal.channel.dto.SysChannelOpenRequest;
import com.asset.dispoal.channel.dto.SysChannelPayRequest;
import com.asset.dispoal.channel.dto.SysChannelRequest;
import com.asset.dispoal.channel.dto.SysChannelResponse;
import com.asset.dispoal.channel.service.common.SysChannelDebtDelCommand;
import com.asset.dispoal.channel.service.common.SysChannelDebtInsertCommand;
import com.asset.dispoal.channel.service.common.SysChannelDebtQueryPageCommand;
import com.asset.dispoal.channel.service.common.SysChannelDebtUpdateCommand;
import com.asset.dispoal.channel.service.common.SysChannelDelCommand;
import com.asset.dispoal.channel.service.common.SysChannelInsertCommand;
import com.asset.dispoal.channel.service.common.SysChannelOpenDelCommand;
import com.asset.dispoal.channel.service.common.SysChannelOpenInsertCommand;
import com.asset.dispoal.channel.service.common.SysChannelOpenQueryPageCommand;
import com.asset.dispoal.channel.service.common.SysChannelOpenUpdateCommand;
import com.asset.dispoal.channel.service.common.SysChannelPayDelCommand;
import com.asset.dispoal.channel.service.common.SysChannelPayInsertCommand;
import com.asset.dispoal.channel.service.common.SysChannelPayQueryByOpenIdCommand;
import com.asset.dispoal.channel.service.common.SysChannelPayUpdateCommand;
import com.asset.dispoal.channel.service.common.SysChannelQueryPageCommand;
import com.asset.dispoal.channel.service.common.SysChannelUpdateCommand;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tech.mhuang.pacebox.springboot.protocol.Result;
import tech.mhuang.pacebox.springboot.protocol.data.PageVO;

/**
 * 批次证据种类映射表服务实现类
 *
 * @author: mhuang
 * @date: 2022-03-23 17:10:57
 */
@Service
public class SysChannelServiceImpl implements SysChannelService {

    @Autowired
    SysChannelDelCommand sysChannelDelCommand;

    @Autowired
    SysChannelUpdateCommand sysChannelUpdateCommand;

    @Autowired
    SysChannelQueryPageCommand sysChannelQueryPageCommand;

    @Autowired
    SysChannelInsertCommand sysChannelInsertCommand;


    @Override
    public Result insert(SysChannelRequest request) {
        return sysChannelInsertCommand.execute(request);
    }

    @Override
    public Result update(SysChannelRequest request) {
        return sysChannelUpdateCommand.execute(request);
    }

    @Override
    public Result delete(String id) {
        return sysChannelDelCommand.execute(id);

    }

    @Override
    public Result<PageVO<SysChannelResponse>> queryPage(SysChannelRequest request) {
        return sysChannelQueryPageCommand.execute(request);
    }

    @Autowired
    SysChannelDebtDelCommand sysChannelDebtDelCommand;

    @Autowired
    SysChannelDebtUpdateCommand sysChannelDebtUpdateCommand;

    @Autowired
    SysChannelDebtQueryPageCommand sysChannelDebtQueryPageCommand;

    @Autowired
    SysChannelDebtInsertCommand sysChannelDebtInsertCommand;

    @Override
    public Result debtInsert(SysChannelDebtRequest request) {
        return sysChannelDebtInsertCommand.execute(request);
    }

    @Override
    public Result debtUpdate(SysChannelDebtRequest request) {
        return sysChannelDebtUpdateCommand.execute(request);
    }

    @Override
    public Result debtDelete(String id) {
        return sysChannelDebtDelCommand.execute(id);
    }

    @Override
    public Result debtQueryPage(SysChannelDebtRequest request) {
        return sysChannelDebtQueryPageCommand.execute(request);
    }

    @Autowired
    SysChannelOpenDelCommand sysChannelOpenDelCommand;

    @Autowired
    SysChannelOpenUpdateCommand sysChannelOpenUpdateCommand;

    @Autowired
    SysChannelOpenQueryPageCommand sysChannelOpenQueryPageCommand;

    @Autowired
    SysChannelOpenInsertCommand sysChannelOpenInsertCommand;


    @Override
    public Result openInsert(SysChannelOpenRequest request) {
        return sysChannelOpenInsertCommand.execute(request);
    }

    @Override
    public Result openUpdate(SysChannelOpenRequest request) {
        return sysChannelOpenUpdateCommand.execute(request);
    }

    @Override
    public Result openDelete(String id) {
        return sysChannelOpenDelCommand.execute(id);
    }

    @Override
    public Result openQueryPage(SysChannelOpenRequest request) {
        return sysChannelOpenQueryPageCommand.execute(request);
    }

    @Autowired
    SysChannelPayDelCommand sysChannelPayDelCommand;

    @Autowired
    SysChannelPayUpdateCommand sysChannelPayUpdateCommand;

    @Autowired
    SysChannelPayQueryByOpenIdCommand sysChannelPayQueryByOpenIdCommand;

    @Autowired
    SysChannelPayInsertCommand sysChannelPayInsertCommand;


    @Override
    public Result payInsert(SysChannelPayRequest request) {
        return sysChannelPayInsertCommand.execute(request);
    }

    @Override
    public Result payUpdate(SysChannelPayRequest request) {
        return sysChannelPayUpdateCommand.execute(request);
    }

    @Override
    public Result payDelete(String id) {
        return sysChannelPayDelCommand.execute(id);
    }

    @Override
    public Result payQueryAll(SysChannelPayRequest request) {
        return sysChannelPayQueryByOpenIdCommand.execute(request);
    }
}